package com.shensi.api.admin.domian.customer.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.shensi.common.core.annotation.Excel;
import com.shensi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 客户电子会员卡充值消费记录对象 customer_card_use_record
 *
 * @author qujia
 * @date 2021-05-18
 */
public class CustomerCardUseRecordDto extends BaseEntity {
    private static final long serialVersionUID = 1L;

    public static final String PAY_TYPE_CONSUME_REF = "csRef";//消费退款
    public static final String PAY_TYPE_CONSUME_PRESENT = "cs_pt";//消费赠送
    public static final String PAY_TYPE_CONSUME_PRESENT_REFUND = "cpRef";//消费赠送退款


    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 充值消费单号
     */
    @Excel(name = "充值消费单号")
    private String orderNo;

    /**
     * 微信用户唯一标识
     */
    @Excel(name = "微信用户唯一标识")
    private String unionId;

    /**
     * 会员号ID
     */
    @Excel(name = "会员号ID")
    private String customerNo;

    /**
     * 客户名
     */
    @Excel(name = "客户名")
    private String customerName;

    /**
     * 电子会员卡消费充值类型：+，充值；-，消费；
     */
    @Excel(name = "电子会员卡消费充值类型：+，充值；-，消费；")
    private String usageType;

    /**
     * 电子会员卡充值消费类型：1.微信；2.POS机
     */
    @Excel(name = "电子会员卡充值消费类型：1.微信；2.POS机")
    private String payType;

    private List<String> payTypeList;

    /**
     * 油类：2.柴油；1.汽油；
     */
    @Excel(name = "油类：2.柴油；1.汽油；")
    private String cardOilsType;

    /**
     * 充值，消费金额
     */
    @Excel(name = "充值，消费金额")
    private BigDecimal amt;

    /**
     * 赠送金额
     */
    @Excel(name = "赠送金额")
    private BigDecimal presentAmt;

    /**
     * 余额
     */
    @Excel(name = "余额")
    private BigDecimal balance;

    /**
     * 油站ID
     */
    @Excel(name = "油站ID")
    private Integer stationId;

    /**
     * 油站名称
     */
    @Excel(name = "油站名称")
    private String stationName;

    /**
     * 是否充值或者消费成功：0，未成功；1，成功
     */
    @Excel(name = "是否充值或者消费成功：0，未成功；1，成功")
    private String status;

    private String czAmt;
    private String xfAmt;

    @Excel(name = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 消费手机号
     */
    @Excel(name = "手机号码")
    private String mobilePhone;

    /**
     * 消费手机号
     */
    @Excel(name = "费率")
    private BigDecimal serviceCharge;

    /**
     * 油企id
     */
    @Excel(name = "油企id")
    private Long enterpriseId;

    private String enterpriseName;

    /**
     * 电子卡使用范围，默认null，非null时不可修改
     * 1-多站通用，2-单站使用
     */
    private String cardUseRangeFlag;

    private String wxAmt;

    private String impAmt;


    private String startTime;

    private String endTime;

    /**
     * pay_way表pay_way_id主键
     */
    private Long payWayId;

    /**
     * 交易单号（微信）注:云化支付存的是云化流水号
     */
    private String transactionId;
    /**
     * 商户单号（商户）注:云化支付存的是云化订单号
     */
    private String merchantsNumber;

    @Excel(name = "调整原因")
    @Setter
    @Getter
    private String reason;

    @Excel(name = "操作人id")
    @Setter
    @Getter
    private Integer operator;

    @Excel(name = "操作人名称")
    @Setter
    @Getter
    private String operatorName;


    @Excel(name = "应付金额")
    @Setter
    @Getter
    private BigDecimal payableAmount;
    /**
     * 实付金额
     */
    private BigDecimal paidAmount;


    @Excel(name = "优惠总金额")
    @Setter
    @Getter
    private BigDecimal discountSum;

    private Long ccsdId;//充值活动id

    private BigDecimal lastRechargeAmt;


    /**
     * 中间变量，无实际意义，不显示
     */
    @JsonIgnore
    private String source;

    public BigDecimal getLastRechargeAmt() {
        return lastRechargeAmt;
    }

    public void setLastRechargeAmt(BigDecimal lastRechargeAmt) {
        this.lastRechargeAmt = lastRechargeAmt;
    }

    public Long getCcsdId() {
        return ccsdId;
    }

    public void setCcsdId(Long ccsdId) {
        this.ccsdId = ccsdId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    @Override
    public String getEndTime() {
        return endTime;
    }

    @Override
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getWxAmt() {
        return wxAmt;
    }

    public void setWxAmt(String wxAmt) {
        this.wxAmt = wxAmt;
    }

    public String getImpAmt() {
        return impAmt;
    }

    public void setImpAmt(String impAmt) {
        this.impAmt = impAmt;
    }

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public BigDecimal getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(BigDecimal serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCzAmt() {
        return czAmt;
    }

    public void setCzAmt(String czAmt) {
        this.czAmt = czAmt;
    }

    public String getXfAmt() {
        return xfAmt;
    }

    public void setXfAmt(String xfAmt) {
        this.xfAmt = xfAmt;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setCustomerNo(String customerNo) {
        this.customerNo = customerNo;
    }

    public String getCustomerNo() {
        return customerNo;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setUsageType(String usageType) {
        this.usageType = usageType;
    }

    public String getUsageType() {
        return usageType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getPayType() {
        return payType;
    }

    public void setCardOilsType(String cardOilsType) {
        this.cardOilsType = cardOilsType;
    }

    public String getCardOilsType() {
        return cardOilsType;
    }

    public void setAmt(BigDecimal amt) {
        this.amt = amt;
    }

    public BigDecimal getAmt() {
        return amt;
    }

    public void setPresentAmt(BigDecimal presentAmt) {
        this.presentAmt = presentAmt;
    }

    public BigDecimal getPresentAmt() {
        return presentAmt;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }

    public Integer getStationId() {
        return stationId;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public String getCardUseRangeFlag() {
        return cardUseRangeFlag;
    }

    public void setCardUseRangeFlag(String cardUseRangeFlag) {
        this.cardUseRangeFlag = cardUseRangeFlag;
    }

    public Long getPayWayId() {
        return payWayId;
    }

    public void setPayWayId(Long payWayId) {
        this.payWayId = payWayId;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getMerchantsNumber() {
        return merchantsNumber;
    }

    public void setMerchantsNumber(String merchantsNumber) {
        this.merchantsNumber = merchantsNumber;
    }

    public List<String> getPayTypeList() {
        return payTypeList;
    }

    public void setPayTypeList(List<String> payTypeList) {
        this.payTypeList = payTypeList;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public BigDecimal getPaidAmount() {
        return paidAmount;
    }

    public void setPaidAmount(BigDecimal paidAmount) {
        this.paidAmount = paidAmount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderNo", getOrderNo())
                .append("unionId", getUnionId())
                .append("customerNo", getCustomerNo())
                .append("customerName", getCustomerName())
                .append("usageType", getUsageType())
                .append("payType", getPayType())
                .append("cardOilsType", getCardOilsType())
                .append("amt", getAmt())
                .append("presentAmt", getPresentAmt())
                .append("balance", getBalance())
                .append("createTime", getCreateTime())
                .append("stationId", getStationId())
                .append("status", getStatus())
                .toString();
    }

    private String sageType;

    public String getSageType() {
        return sageType;
    }

    public void setSageType(String sageType) {
        this.sageType = sageType;
    }
}
